/*
 * Copyright 2015-2016 Red Hat, Inc. and/or its affiliates
 * and other contributors as indicated by the @author tags.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
@import "../../../libs/patternfly/less/lib/bootstrap/variables.less";
@import "../../../libs/patternfly/less/lib/bootstrap/mixins.less";
@import "../../../libs/patternfly/less/variables.less";


// Variables

@danger-bg:                                                         rgba(204,0,0,0.07);

/* Error message handling */

label.error {color: red}

/* Styling for e2e table */

.sort-icon {
    font-size: 9px;
    margin-left: 5px;
}

th {
    cursor:pointer;
}

.hk-sidebar {
    margin-top: 45px;
}

.hk-sidebar-collapsed {
    margin-left: -18em;
}

.hk-sidebar-toggle {
    margin-top: -3em;

    i {
        margin-right: -1.6em;
    }
}

.hk-content-sidebar-expanded {
    @media (min-width: @screen-sm-min) {
        margin-left: 2em !important;
        width: calc(100% - 2em) !important;
    }
}

.dt-card {
    min-height: calc(~"100vh - 110px");
    position: absolute;
    margin-top: 90px;
    top: 0;
    width: calc(~"100% - 22em");

    .card-pf-body {
        min-height: calc(~"100vh - 220px");
        position: absolute;
        top: 0;
        right: 10px;
        left: 10px;
        bottom: 10px;

        .dt {
            height: calc(~"100vh - 220px");
        }
    }
}

.dt-card.no-sidebar {
    width: calc(~"100% - 4em");
}

.graph-tooltip hr {
    margin-top: 5px;
    margin-bottom: 5px;
}

/* Diagram styles */

.graph {
    width: 100%;
    height: 100%;

    svg {
        width: 100%;
        height: 100%;
        overflow: hidden;

        text {
            font-weight: 300;
            font-size: 14px;
        }
    }
    .node {
        rect {
            stroke-width: 1.5px;
            stroke: #bbb;
            fill: #666;
        }
    }
    .status {
        height: 100%;
        width: 15px;
        display: block;
        float: left;
        border-top-left-radius: 5px;
        border-bottom-left-radius: 5px;
        margin-right: 4px;
        margin-top: -4px;
    }

    .node-count {
        direction: rtl;
        margin-right: -15px;
    }
    .name {
        margin-top: 4px;
        display: inline-block;
        font-size: 1.3em;
    }
    .service-name {
        display: block;
        font-style: italic;
    }
    .stats {
        display: block;
        float: left;
        width: 80%;
        height: 20px;
        font-size: 11px;
        margin-top: 5px;
        color: #d6d6d6;
    }
    // .node g div {
    //     width: 200px;
    //     height: 40px;
    //     color: #fff;
    // }
    .node g div span.node-count {
        display: inline-block;
        width: 20px;
    }
    .edgeLabel {
        text {
            width: 50px;
            fill: #999;
        }
        .label {
            color: #999;
        }
    }
    .edgePath path {
        stroke: #999;
        stroke-width: 1.5px;
        fill: #999;
    }

    .empty-edge {
        opacity: 0.3 !important;
    }

    .severity-0 .status {
        background-color: #7f7;
    }
    .severity-1 .status {
        background-color: #33af26;
    }
    .severity-2 .status {
        background-color: #ffed68;
    }
    .severity-3 .status {
        background-color: #ffac68;
    }
    .severity-4 .status {
        background-color: #f77;
    }
    .severity-5 .status {
        background-color: #ff2c2c;
    }
    .empty-node {
        opacity: 0.5 !important;
        .status {
            display: none !important;
        }
        span.node-count {
            display: none !important;
        }
        .stats {
            display: none !important;
        }
        .name {
            margin-top: 0.9em
        }
    }
    .entity {
        stroke-width: 1.5px;
        fill: #72767B;
    }
    .entity .node-label {
        margin-left: 1.5em;
    }
    .entity.circle .node-label {
        margin-left: 0;
    }
    .entity.producer .node-label {
        margin-left: 1.0em;
    }
    .entity.consumer {
        .duration {
            margin-left: 0.5em;
        }
    }
    .entity.severity0 {
        stroke: #6ec664;
    }
    .entity.severity1 {
        stroke: #f0ab00;
    }
    .entity.severity2 {
        stroke: #ec7a08;
    }
    .entity.severity3 {
        stroke: #b35c00;
    }
    .entity.severity4 {
        stroke: #cc0000;
    }
    i.spawn {
        color: #ddd;
        font-size: 2.5em;
        margin: 0.2em 0.1em 0.2em 0em;
    }
    i.database, i.ejb {
        color: #eee;
        padding-top: 3px;
    }
    div.name {
        color: #eee;
    }
    .duration>i {
        color: #ddd;
    }
    .dashed-line {
        stroke-dasharray: 6,3
    }
    .black-line path {
        stroke: #000;
        fill: #000;
    }
}

.graph.dt .node g div {
    min-width: 200px;
    max-width: 500px;
    height: 60px;
    color: #fff;
}

/** Instance Details Table styles */

.inst-details-table {
    table-layout: fixed;
}

th.inst-details-timestamp {
    width: 105px;
}

td.inst-details-properties {
    overflow: hidden;

    span {
        margin: 1px;
        display: inline-block;
        cursor: pointer;
        white-space: normal;
        text-align: left;
    }
}

th.inst-details-duration {
    width: 120px;
}
td.inst-details-duration {
    word-wrap: break-word;
}

th.inst-details-details {
    width: 60px;
}
td.inst-details-details {
    cursor: pointer;
    text-align: center;
}

.inst-details-properties .tooltip-inner {
    max-width: 100%;
}

.inst-details-properties .tooltip {
    max-width: 95%;
}

.details-row {
    background-color: #FFF;
}
